	format	MS COFF
	extrn	___bb_blitz_blitz
	extrn	___bb_drivers_drivers
	extrn	___bb_ui_tabmodule
	extrn	_bbAppTitle
	extrn	_bbArrayNew1D
	extrn	_bbEmptyArray
	extrn	_bbEnd
	extrn	_bbGCFree
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectFree
	extrn	_bbObjectNew
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbStringClass
	extrn	_bbSystemDesktopHeight
	extrn	_bbSystemDesktopWidth
	extrn	_brl_blitz_DebugLog
	extrn	_brl_eventqueue_CurrentEvent
	extrn	_brl_eventqueue_EventID
	extrn	_brl_eventqueue_WaitEvent
	extrn	_maxgui_maxgui_CreateMenu
	extrn	_maxgui_maxgui_CreateWindow
	extrn	_maxgui_maxgui_SetGadgetShape
	extrn	_maxgui_maxgui_UpdateWindowMenu
	extrn	_maxgui_maxgui_WindowMenu
	public	___bb_ui_editorui
	public	__bb_Editor_Main_Delete
	public	__bb_Editor_Main_Init
	public	__bb_Editor_Main_New
	public	__bb_Editor_Main_New_Rect
	public	__bb_Editor_Main_SetMenu
	public	__bb_Editor_Main_SetWindow
	public	__bb_Editor_Main_UpdateUI
	public	__bb_UIRect_Delete
	public	__bb_UIRect_New
	public	__bb_UIRect_Set
	public	_bb_Editor_Main
	public	_bb_UIRect
	section	"code" code
___bb_ui_editorui:
	push	ebp
	mov	ebp,esp
	cmp	dword [_100],0
	je	_101
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_101:
	mov	dword [_100],1
	call	___bb_blitz_blitz
	call	___bb_drivers_drivers
	call	___bb_ui_tabmodule
	push	_bb_Editor_Main
	call	_bbObjectRegisterType
	add	esp,4
	push	_bb_UIRect
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,0
	jmp	_59
_59:
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_bb_Editor_Main
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+8],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+12],eax
	mov	dword [ebx+16],525
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+20],eax
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+24],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+28],eax
	push	_bb_UIRect
	call	_bbObjectNew
	add	esp,4
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_110
	push	eax
	call	_bbGCFree
	add	esp,4
_110:
	mov	dword [ebx+12],esi
	push	dword [ebx+16]
	push	_bbNullObject
	mov	eax,dword [ebx+12]
	push	dword [eax+20]
	mov	eax,dword [ebx+12]
	push	dword [eax+16]
	mov	eax,dword [ebx+12]
	push	dword [eax+12]
	mov	eax,dword [ebx+12]
	push	dword [eax+8]
	push	dword [_bbAppTitle]
	call	_maxgui_maxgui_CreateWindow
	add	esp,28
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_114
	push	eax
	call	_bbGCFree
	add	esp,4
_114:
	mov	dword [ebx+8],esi
	mov	eax,0
	jmp	_62
_62:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_65:
	mov	eax,dword [ebx+28]
	dec	dword [eax+4]
	jnz	_117
	push	eax
	call	_bbGCFree
	add	esp,4
_117:
	mov	eax,dword [ebx+24]
	dec	dword [eax+4]
	jnz	_119
	push	eax
	call	_bbGCFree
	add	esp,4
_119:
	mov	eax,dword [ebx+20]
	dec	dword [eax+4]
	jnz	_121
	push	eax
	call	_bbGCFree
	add	esp,4
_121:
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_123
	push	eax
	call	_bbGCFree
	add	esp,4
_123:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_125
	push	eax
	call	_bbGCFree
	add	esp,4
_125:
	mov	eax,0
	jmp	_115
_115:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_Init:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	mov	ebx,esi
	call	_bbSystemDesktopHeight
	cdq
	and	edx,3
	add	eax,edx
	sar	eax,2
	imul	eax,3
	push	eax
	call	_bbSystemDesktopWidth
	cdq
	and	edx,3
	add	eax,edx
	sar	eax,2
	imul	eax,3
	push	eax
	call	_bbSystemDesktopHeight
	cdq
	and	edx,3
	add	eax,edx
	sar	eax,2
	push	eax
	call	_bbSystemDesktopWidth
	cdq
	and	edx,3
	add	eax,edx
	sar	eax,2
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,20
	push	eax
	push	esi
	mov	eax,dword [esi]
	call	dword [eax+56]
	add	esp,8
	mov	eax,esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
	mov	eax,0
	jmp	_68
_68:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_New_Rect:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+16]
	mov	edi,dword [ebp+20]
	push	_bb_UIRect
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	mov	eax,ebx
	push	dword [ebp+24]
	push	edi
	push	esi
	push	dword [ebp+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,20
	mov	eax,ebx
	jmp	_75
_75:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_SetWindow:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	cmp	ebx,_bbNullObject
	je	_131
	mov	eax,ebx
	inc	dword [eax+4]
	mov	edi,eax
	mov	eax,dword [esi+12]
	dec	dword [eax+4]
	jnz	_135
	push	eax
	call	_bbGCFree
	add	esp,4
_135:
	mov	dword [esi+12],edi
	push	dword [ebx+20]
	push	dword [ebx+16]
	push	dword [ebx+12]
	push	dword [ebx+8]
	push	dword [esi+8]
	call	_maxgui_maxgui_SetGadgetShape
	add	esp,20
_131:
	mov	eax,0
	jmp	_79
_79:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_UpdateUI:
	push	ebp
	mov	ebp,esp
	call	_brl_eventqueue_WaitEvent
	mov	eax,dword [_brl_eventqueue_CurrentEvent]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+24]
	add	esp,4
	push	eax
	call	_brl_blitz_DebugLog
	add	esp,4
	call	_brl_eventqueue_EventID
	cmp	eax,259
	je	_139
	cmp	eax,16387
	je	_139
	jmp	_138
_139:
	call	_bbEnd
	jmp	_138
_138:
	mov	eax,0
	jmp	_82
_82:
	mov	esp,ebp
	pop	ebp
	ret
__bb_Editor_Main_SetMenu:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	push	10
	push	_140
	call	_bbArrayNew1D
	add	esp,8
	mov	ebx,eax
	push	0
	push	0
	push	dword [esi+8]
	call	_maxgui_maxgui_WindowMenu
	add	esp,4
	push	eax
	push	0
	push	_27
	call	_maxgui_maxgui_CreateMenu
	add	esp,20
	inc	dword [eax+4]
	mov	edi,eax
	mov	eax,dword [ebx+24]
	dec	dword [eax+4]
	jnz	_145
	push	eax
	call	_bbGCFree
	add	esp,4
_145:
	mov	dword [ebx+24],edi
	push	dword [esi+8]
	call	_maxgui_maxgui_UpdateWindowMenu
	add	esp,4
	inc	dword [ebx+4]
	mov	eax,dword [esi+20]
	dec	dword [eax+4]
	jnz	_149
	push	eax
	call	_bbGCFree
	add	esp,4
_149:
	mov	dword [esi+20],ebx
	mov	eax,0
	jmp	_85
_85:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_UIRect_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_bb_UIRect
	mov	dword [ebx+8],10
	mov	dword [ebx+12],10
	mov	dword [ebx+16],10
	mov	dword [ebx+20],10
	mov	eax,0
	jmp	_88
_88:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_UIRect_Delete:
	push	ebp
	mov	ebp,esp
_91:
	mov	eax,0
	jmp	_150
_150:
	mov	esp,ebp
	pop	ebp
	ret
__bb_UIRect_Set:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	ecx,dword [ebp+16]
	mov	edx,dword [ebp+20]
	mov	eax,dword [ebp+24]
	mov	dword [esi+8],ebx
	mov	dword [esi+12],ecx
	mov	dword [esi+16],edx
	mov	dword [esi+20],eax
	mov	eax,0
	jmp	_98
_98:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_100:
	dd	0
_29:
	db	"Editor_Main",0
_30:
	db	"MainWindow",0
_31:
	db	":maxgui.maxgui.TGadget",0
_32:
	db	"WinSize",0
_33:
	db	":UIRect",0
_34:
	db	"WinFlags",0
_35:
	db	"i",0
_36:
	db	"MenuItems",0
_37:
	db	"[]:maxgui.maxgui.TGadget",0
_38:
	db	"Modules",0
_39:
	db	"[]:Tab_Module",0
_40:
	db	"Module_Gadget",0
_41:
	db	"New",0
_42:
	db	"()i",0
_43:
	db	"Delete",0
_44:
	db	"Init",0
_45:
	db	"New_Rect",0
_46:
	db	"(i,i,i,i):UIRect",0
_47:
	db	"SetWindow",0
_48:
	db	"(:UIRect)i",0
_49:
	db	"UpdateUI",0
_50:
	db	"SetMenu",0
	align	4
_28:
	dd	2
	dd	_29
	dd	3
	dd	_30
	dd	_31
	dd	8
	dd	3
	dd	_32
	dd	_33
	dd	12
	dd	3
	dd	_34
	dd	_35
	dd	16
	dd	3
	dd	_36
	dd	_37
	dd	20
	dd	3
	dd	_38
	dd	_39
	dd	24
	dd	3
	dd	_40
	dd	_31
	dd	28
	dd	6
	dd	_41
	dd	_42
	dd	16
	dd	6
	dd	_43
	dd	_42
	dd	20
	dd	6
	dd	_44
	dd	_42
	dd	48
	dd	6
	dd	_45
	dd	_46
	dd	52
	dd	6
	dd	_47
	dd	_48
	dd	56
	dd	6
	dd	_49
	dd	_42
	dd	60
	dd	6
	dd	_50
	dd	_42
	dd	64
	dd	0
	align	4
_bb_Editor_Main:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_28
	dd	32
	dd	__bb_Editor_Main_New
	dd	__bb_Editor_Main_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__bb_Editor_Main_Init
	dd	__bb_Editor_Main_New_Rect
	dd	__bb_Editor_Main_SetWindow
	dd	__bb_Editor_Main_UpdateUI
	dd	__bb_Editor_Main_SetMenu
_52:
	db	"UIRect",0
_53:
	db	"x",0
_54:
	db	"y",0
_55:
	db	"w",0
_56:
	db	"h",0
_57:
	db	"Set",0
_58:
	db	"(i,i,i,i)i",0
	align	4
_51:
	dd	2
	dd	_52
	dd	3
	dd	_53
	dd	_35
	dd	8
	dd	3
	dd	_54
	dd	_35
	dd	12
	dd	3
	dd	_55
	dd	_35
	dd	16
	dd	3
	dd	_56
	dd	_35
	dd	20
	dd	6
	dd	_41
	dd	_42
	dd	16
	dd	6
	dd	_43
	dd	_42
	dd	20
	dd	6
	dd	_57
	dd	_58
	dd	48
	dd	0
	align	4
_bb_UIRect:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_51
	dd	24
	dd	__bb_UIRect_New
	dd	__bb_UIRect_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__bb_UIRect_Set
_140:
	db	":maxgui.maxgui.TGadget",0
	align	4
_27:
	dd	_bbStringClass
	dd	2147483647
	dd	4
	dw	70,105,108,101
